from flask_migrate import Migrate, MigrateCommand
from flask_script import Manager
from info import create_app, db, models

# manage.py是程序启动的入口,只关心启动的相关参数以及内容,不关心具体该
# 如何创建app或者相关业务逻辑

app = create_app('development')

# 将app和Manager关联起来
manager = Manager(app)
# 将app 和 db 联系起来
Migrate(app, db)
# 将MigrateCommand 命令绑定到manger中
manager.add_command('db', MigrateCommand)



if __name__ == "__main__":
    print(app.url_map)

    manager.run()
